<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
	  			xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:a="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
				template="template.xhtml">

<ui:define name="page-name">
	<h:outputText value="Carteiras"/>
</ui:define>

<!-- content -->
<ui:define name="content">

<div class="section">
	<h:form id="bookings">
		<s:button
			id="cancelar"
			value="Cancelar"
			view="/carteiras.xhtml"
			propagation="end"/>
	</h:form>
</div>

<div class="section">
<h:form id="criarCarteira">
	<rich:panel>
	  	<f:facet name="header">
	  		<h:outputText value="Dados da Carteira"/>
	  	</f:facet>
	<h:panelGrid columns="2">
		<h:outputText value="nome" />
		<h:inputText value="#{carteiraHome.instance.nome}" required="true" />
	</h:panelGrid>
	</rich:panel>
	
  	<rich:panel>
	  	<f:facet name="header">
	  		<h:outputText value="ativos participantes"/>
	  	</f:facet>
	  	
		<rich:pickList value="#{carteiraHome.ativos}"
			sourceListWidth="160px"
			targetListWidth="160px">
			<s:selectItems var="ativo" value="#{ativoList.resultList}" label="#{ativo.simbolo}"/>
			<s:convertEntity/>
		</rich:pickList>
		
	</rich:panel>
	<h:commandButton action="#{carteiraHome.persist}" value="Salvar" />
</h:form>
</div>

</ui:define>

</ui:composition>
